////////////////////////////////////////////////////////////////////////////////
//
//	This file is part of Woozox, see <http://code.google.com/p/woozox/>.
//
//	Copyright 2008-2009 Florian David
//
//	Woozoo is free software: you can redistribute it and/or modify
//	it under the terms of the GNU Lesser General Public License as 
//	published by the Free Software Foundation, either version 3 of 
//	the License, or (at your option) any later version.
//
//	Woozoo is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRANTY; without even the implied warranty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//	GNU General Public License for more details.
//
//	You should have received a copy of the GNU Lesser General Public 
//	License along with Woozoo. If not, see <http://www.gnu.org/licenses/>.
//
////////////////////////////////////////////////////////////////////////////////
package org.woozoo.xhtml.wordpress.base
{ 
	import flash.events.Event;
	
	import org.woozoo.xhtml.extended.base.EXDocument;
	import org.woozoo.xhtml.wordpress.theme.WPTheme;

	public class WPDocument extends EXDocument
	{
		private var __multiplePostPossible : Boolean = true;
		
		/**
		 * 
		 * */
		public function WPDocument(name:String, url:String, source:* = null)
		{
			super(name, url, source);
		}
		
		/**
		 * 
		 * */
		public function get hasNewerEntries() : Boolean {
			if (!multiplePostPossible) return false;
			if (!source) return false;
			return $$(WPTheme.DOCUMENT_NEWER_ENTRIES_SELECTOR, false).innerHTML != '';
		}
		
		/**
		 * 
		 * */
		public function get hasOlderEntries() : Boolean {
			if (!multiplePostPossible) return false;
			if (!source) return false;
			return $$(WPTheme.DOCUMENT_OLDER_ENTRIES_SELECTOR, false).innerHTML != '';
		}
		
		/**
		 * 
		 * */
		public function get multiplePostPossible() : Boolean {
			return __multiplePostPossible;
		}
		public function set multiplePostPossible(value : Boolean) : void {
			__multiplePostPossible = value;
		}
	}
}